3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
A model's subdivision style determines how a renderer decomposes smooth curves and surfaces into polylines and polygonal meshes for display purposes. You can control the fineness of the decomposition by changing either the subdivision style or the parameters associated with a particular style. QuickDraw 3D defines constants for the subdivision styles that are currently available.
typedef enum TQ3SubdivisionMethod {
kQ3SubdivisionMethodConstant,
kQ3SubdivisionMethodWorldSpace,
kQ3SubdivisionMethodScreenSpace
} TQ3SubdivisionMethod;
The value kQ3SubdivisionMethodConstant specifies constant subdivision: the renderer should subdivide a curve into some given number of polyline segments and a surface into a certain-sized mesh of polygons.
The value kQ3SubdivisionMethodWorldSpace specifies world-space subdivision: the renderer should subdivide a curve (or surface) into polylines (or polygons) whose sides have a world-space length that is at most as large as a given value.
The value kQ3SubdivisionMethodScreenSpace specifies screen-space subdivision: the renderer should subdivide a curve (or surface) into polylines (or polygons) whose sides have a length that is at most as large as some number of pixels.
A full specification of a subdivision style requires both a subdivision method (which is specified by one of the three subdivision style constants) together with one or two subdivision method specifiers. For a curve rendered with constant subdivision, for example, the subdivision method specifier indicates the number of polylines into which the curve is to be subdivided. A subdivision method specifier is passed either as a parameter to a routine or as a field in a subdivision style data structure. See [link] for complete details on the meaning of subdivision method specifiers for each of the three subdivision methods.
Previous | QD3D Book | Overview | Chapter Contents | Next |